<extend name="Public:base" />
<block name="header_js">
<script type="text/javascript" src="__DATA__/editor/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__DATA__/editor/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function(){
    var ue = UE.getEditor('inputContent',{
        serverUrl :"{:U('Public/editorMethod')}"
    });
})
</script>

<script type="text/javascript" src="__PUBLIC__/js/calendar.config.js"></script>
<script type="text/javascript" src="__DATA__/static/jq_plugins/iColorPicker/iColorPicker.js"></script>

</block>

<block name="content">
	<div class="row">
		<div class="col-lg-12">
			<h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em> 
			添加公告  
		    </h3>
		</div>
		
	</div>


	<div class="row">
		<div class="col-lg-12">

				<form method='post' class="form-horizontal" id="form_do" name="form_do" action="{:U('add')}">											

					<div class="form-group">
						<label for="inputTtitle" class="col-sm-2 control-label">公告标题</label>
						<div class="col-sm-9">
							<input type="text" name="title" id="inputTtitle" class="form-control" placeholder="公告标题" required="required" />									
						</div>
					</div>
					<div class="form-group">
						<label for="starttime" class="col-sm-2 control-label">起始日期</label>
						<div class="col-sm-9">
							<input type="text" name="starttime" id="starttime" value="{:date('Y-m-d H:i:s',time())}" class="form-control" />
			                <script type="text/javascript">
			                    Calendar.setup({
			                        weekNumbers: true,
			                        inputField : "starttime",
			                        trigger    : "starttime",
			                        dateFormat: "%Y-%m-%d %H:%M:%S",
			                        showTime: true,
			                        minuteStep: 1,
			                        onSelect   : function() {this.hide();}
			                    });
			                </script>
						</div>
					</div>

					<div class="form-group">
						<label for="endtime" class="col-sm-2 control-label">截止日期</label>
						<div class="col-sm-5">
							<input type="text" name="endtime" id="endtime" value="{:date('Y-m-d H:i:s',strtotime('+1 year'))}" class="form-control" />
			                <script type="text/javascript">
			                    Calendar.setup({
			                        weekNumbers: true,
			                        inputField : "endtime",
			                        trigger    : "endtime",
			                        dateFormat: "%Y-%m-%d %H:%M:%S",
			                        showTime: true,
			                        minuteStep: 1,
			                        onSelect   : function() {this.hide();}
			                    });

			                </script>								
						</div>
					</div>

					<div class="form-group">
						<label for="inputContent" class="col-sm-2 control-label">内容</label>
						<div class="col-sm-9">
							<textarea name="content" id="inputContent" style="height: 370px;"></textarea>						
						</div>
					</div>					

					
					
					<div class="row margin-botton-large">
						<div class="col-sm-offset-2 col-sm-9">
							<div class="btn-group">
								<button type="submit" class="btn btn-primary"> <i class="glyphicon glyphicon-saved"></i>
									保存
								</button>
								<button type="button" onclick="goUrl('{:U('index')}')" class="btn btn-default"> <i class="glyphicon glyphicon-chevron-left"></i>
									返回
								</button>
							</div>
						</div>
					</div>
				</form>
	
		</div>
	</div>

		


</block>